package zy1208.zy24;

import java.io.FileInputStream;
import java.util.HashMap;
import java.util.Properties;
import java.util.Set;

public class demo {
    public static void main(String[] args) throws Exception {
        Properties prop = new Properties();
        FileInputStream f = new FileInputStream("mapdata.properties");
        HashMap<String, String> map = new HashMap<>();
        prop.load(f);
        f.close();
        Set<String> set = prop.stringPropertyNames();
        for (String s : set) {
            map.put(s,prop.getProperty(s));
        }
        for (String s : map.keySet()) {
            System.out.println(s+" "+map.get(s));
        }
    }
}
